class Location < ActiveRecord::Base

  def map
    Map.new(attributes.keep(:x, :y, :zoom))
  end
  
  def map=(m)
    self.x = m.x
    self.y = m.y
    self.zoom = m.zoom
  end
  
  def coordinates
    [ self.x, self.y, self.zoom ]
  end
  
end